class Moderatorship < ActiveRecord::Base
  
  belongs_to :user
  belongs_to :forum
  
  validates_presence_of :user, :forum
  
  include PermissionHandler
  
  def owned_by?(user)
    self.user == user
  end
  
  def moderated_by?(user)
    forum.moderated_by? user
  end
  
  def base_permissions(action, item_type, item = nil)
    item.moderated_by? user
  end
  
  def can_create_forum?(forum = nil)
    false
  end
  
  def can_create_moderatorship?(moderatorship = nil)
    false
  end
  
end
